﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XbsWebAPI.EntityFrameworkCore.Entities.SystemAdmin
{
    /// <summary>
    /// 菜单实体
    /// </summary>
    public class Menu:XbsBasicClass
    {

        public string Name { get; set; }

        /// <summary>
        /// 菜单父级名称
        /// </summary>
        public string PName { get; set; }
        
        /// <summary>
        /// 菜单父级Id
        /// </summary>
        public Guid? PId { get; set; }

        public string Icon { get; set; }

        public string Path { get; set; }

        public int Sort { get; set; }

        /// <summary>
        /// 菜单类型
        /// </summary>
        public MenuType MenuType { get; set; }

        /// <summary>
        /// 按钮标识
        /// </summary>
        public string Identifying { get; set; }

        public Guid? ParentId { get; set; }

        public Guid? ChildId { get; set; }

        public Guid? ButtonId { get; set; }


    }

    public enum ButtonType
    {
        Select = 0,
        Add = 1,
        Edit = 2,
        Delete = 3
    }

    public enum MenuType
    {
        /// <summary>
        /// 父级菜单
        /// </summary>
        Parent = 1,

        /// <summary>
        /// 子集菜单
        /// </summary>
        Child = 2,

        /// <summary>
        /// 按钮级
        /// </summary>
        Button = 3,
    }
}
